CREATE TABLE [dbo].[DnnProduct_ContentItems_MetaData]
(
[ContentItemMetaDataID] [int] NOT NULL IDENTITY(1, 1),
[ContentItemID] [int] NOT NULL,
[MetaDataID] [int] NOT NULL,
[MetaDataValue] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_ContentItems_MetaData] ADD CONSTRAINT [PK_DnnProduct_Content_MetaData] PRIMARY KEY CLUSTERED  ([ContentItemMetaDataID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_ContentItems_MetaData] ADD CONSTRAINT [FK_DnnProduct_ContentItems_MetaData_DnnProduct_ContentItems] FOREIGN KEY ([ContentItemID]) REFERENCES [dbo].[DnnProduct_ContentItems] ([ContentItemID]) ON DELETE CASCADE ON UPDATE CASCADE
GO
ALTER TABLE [dbo].[DnnProduct_ContentItems_MetaData] ADD CONSTRAINT [FK_DnnProduct_ContentItems_MetaDataDnnProduct_MetaData] FOREIGN KEY ([MetaDataID]) REFERENCES [dbo].[DnnProduct_MetaData] ([MetaDataID]) ON DELETE CASCADE ON UPDATE CASCADE
GO
